package com.clazz;

import java.lang.management.ManagementFactory;

public class Base {
	public static void process() {
		Class<Base> clzz = Base.class;
		System.out.println("process");
	}
//	public static void main(String[] args) {
//		Base b = new Base();
//		b.process(); 
//	}

	public static void main(String[] args) {
		String name = ManagementFactory.getRuntimeMXBean().getName();
		String s = name.split("@")[0];
		System.out.println(name);
		// 打印当前Pid
		System.out.println("pid:" + s);
		while (true) {
			try {
				Thread.sleep(5000L);
			} catch (Exception e) {
				break;
			}
			process();
		}
	}
}
